<template>
  <div class="game-introduce">
    <div class="game-name">{{ props.currentGame.name }}</div>
    <div class="game-tag">
      <span v-for="(item, index) in props.currentGame.tags" :key="index">{{ item }}</span>
    </div>
    <button class="game-button" @click="$router.push(`/game/detail/${props.currentGame.id}`)">查看</button>
  </div>
</template>

<script setup lang="ts">
import type { IgameItem } from "@/types/gameType";

const props = defineProps<{
  currentGame: IgameItem;
}>();
</script>

<style scoped lang="scss">
.game-introduce {
  position: relative;
  width: 100%;
  height: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: var(--font-color);
  .game-name {
    font-weight: 700;
    font-size: 22px;
  }
  .game-tag {
    margin: 10px 0;
    color: var(--font-light-color);
    font-size: 12px;
    span {
      margin: 0 5px;
    }
  }
  .game-button {
    width: 60%;
    height: 34px;
    background: linear-gradient(270deg, #9cfbe5, #58e2fb, #e9b7e4);
    box-shadow: 0 6px 10px #76d8df;
    border: unset;
    outline: unset;
    border-radius: 24px;
    color: #fff;
    &:active {
      opacity: 0.8;
    }
  }
}
</style>
